<?php

require_once '../../includes/includes.php';

if (isset($_POST['title'], $_POST['id'])) {

    $title = $_POST['title'];
    $id = $_POST['id'];

    $table = 'photographs';
    $data = array('title' => $title);
    $where_sql = 'id = :id';
    $where_data = array('id' => $id);

    $db->update($table, $data, $where_sql, $where_data);

}